package com.bwie.controller;

import com.bwie.pojo.TbGroupActive;
import com.bwie.service.TbGroupActiveService;
import com.bwie.utils.R;
import com.bwie.vo.PageInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/product/index")
public class IndexController {
    @Autowired
    TbGroupActiveService tbGroupActiveService;


    @PostMapping("/getGroupActivePage")
    public R getGroupActivePage(@RequestBody PageInfoVo pageInfoVo) {
        return tbGroupActiveService.getGroupActivePage(pageInfoVo);
    }


    @PostMapping("/addGroupActive")
    public R addGroupActive(@RequestBody TbGroupActive tbGroupActive) {
        return tbGroupActiveService.addGroupActive(tbGroupActive);
    }

    @PostMapping("/updateGroupActive")
    public R updateGroupActive(@RequestBody TbGroupActive tbGroupActive) {
        return tbGroupActiveService.updateGroupActive(tbGroupActive);
    }


    @PostMapping("/deleteGroupActive/{activeId}")
    public R deleteGroupActive(@PathVariable("activeId") Integer activeId) {
        return tbGroupActiveService.deleteGroupActive(activeId);
    }
}
